﻿<%
'强制浏览器重新访问服务器下载页面，而不是从缓存读取页面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<html>
<head>
<title>系统登陆</title>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<script src="../Js/Form.js"></script>
<script language=JavaScript type=text/JavaScript>
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){ 
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}
clearTimeout(nereidFadeTimers[object.sourceIndex]);
diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
						direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}
</script>
<!--#include file="../Include/Conn.asp"-->
<!--#include file="../Include/Md5.asp"-->
<!--#include file="../Include/Fun.asp"-->
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
if request.form.count >0 then'检验用户登入
set rs=server.createobject("adodb.recordset")
dim adminName,adminPass,sql
if trim(Request.Form("postcode"))<>trim(Session("postcode")) then 
Call ShowAlert("您输入的验证码不对，请重新输入","")
end if
adminName=request.form("adminname")
adminPass=md5(md5(trim(request.Form("adminpass")),32),16)
set rs=server.createobject("adodb.recordset")
sql="select * from Admins where Admin_user='"&adminName&"'"
rs.open sql,conn,1,3
   if not rs.eof then
       if adminPass=rs("Admin_pass") then
	         dim Admin_loginip:Admin_loginip=request.servervariables("http_x_forwarded_for") 
	         if Admin_loginip="" then 
	         Admin_loginip=request.servervariables("remote_addr")
	         end if
	   response.Cookies("AdminName")=rs("Admin_name")
       response.Cookies("AdminState")=rs("Admin_state")
       session("AdminId")=rs("Admin_user")
       rs("Admin_logintime")=now
       rs("Admin_logintimes")=rs("Admin_logintimes")+1
       rs("Admin_loginip")=Admin_loginip
	   rs.update
	   Call ShowAlert("登入成功!","AdminIndex.asp") 
       else
       Call ShowAlert("系统出错,请返回","../Index.asp")
	   end if
   else
   Call ShowAlert("系统出错,请返回","../Index.asp")
   end if
rs.close
end if
%>
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle">
<table width="646" height="425" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="3">
			<img src="images/login_01.gif" width="646" height="114"></td>
	</tr>
	<tr>
		<td>
			<img src="images/login_02.gif" width="88" height="311" alt=""></td>
	  <td width="476" height="311" valign="top" background="images/login_03.gif"><br>
		         <form action="" method="post" name="form1">
		      <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="138" height="30" align="right" style="font-size:12px;">登录名：</td>
            <td width="243" valign="middle"><input type="text" name="adminname" tabindex="1" style="width:160px;"></td>
            </tr>
          <tr>
            <td height="30" align="right" style="font-size:12px;">密　码：</td>
            <td><input name="adminpass"  type="password" tabindex="2" style="width:160px;"></td>
          </tr>
          <tr>
            <td height="30" align="right" style="font-size:12px;">验证码：</td>
            <td height="30"><input type=text name="postcode" maxLength=6 size="6" tabindex="3" class="textbox">
             <IMG style="cursor:hand;" src="../Include/PostCode.asp?n=<%=Timer%>" onClick="this.src=this.src;" align="absmiddle">&nbsp;</td>
          </tr>
          <tr>
            <td height="50" colspan="2" align="center"><input onMouseOver=nereidFade(this,100,10,5)  style="FILTER:alpha(opacity=50)" onMouseOut=nereidFade(this,50,10,5) src="images/dl.gif"  type="image" tabindex="5" name="enter" border="0" onClick="return CheckAdminLogin();">
            </td>
            </tr>
          <tr>
            <td colspan="2"></td>
          </tr>
        </table>
		</form><hr size=1 color='#efefef' width='80%' align='center'>
		<p align="center"><span style="height: 30px; text-align:right;font-size:12px;">Copyright 
    <sup>&copy;</sup> 2007 <a href="http://www.dxstudio.cn" target="_blank" title="访问东旭工作室网站">东旭工作室</a> All Rights Reserved .</span></p></td>
		<td><img src="images/login_04.gif" width="82" height="311" alt=""></td>
	</tr>
</table>
</td></tr></table>
<script language=javascript>
<!--
function document.onreadystatechange()
{  var app=navigator.appName;
  var verstr=navigator.appVersion;
  if(app.indexOf('Netscape') != -1) {
    alert('友情提示：\n    您使用的是Netscape浏览器，可能会导致无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。');
  } else if(app.indexOf('Microsoft') != -1) {
    if (verstr.indexOf('MSIE 3.0')!=-1 || verstr.indexOf('MSIE 4.0') != -1 || verstr.indexOf('MSIE 5.0') != -1 || verstr.indexOf('MSIE 5.1') != -1)
      alert('友情提示：\n    您的浏览器版本太低，可能会导致无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。');
  }
  document.form1.adminname.focus();
}
//-->
</script>
</html>